function show() {
	//get news data
	getNewsList(1);
	//get left data
	/*====get teacher info====*/
	/*
	$.ajax( {
		url: "/edu/teacher/getTeacherList",
		type: "POST",
		data: {
			count: 3
		},
		dataType: "json",
		async: false,
		success: function(data) {
			if (data.status) {
				$.each(data.teacherInfo, function(i, item) {
					$("#t" + i).css("background", "url(" + item.photoPath + ")");
					$("#t" + i + " > span").innerHTML = item.name + "<br />" + item.edubg;
					$("#t" + i + " > a").attr("href", "/edu/teacher/teacherInfo.html?teacher_id=" + item.teacherId);
				});
			} else {

			}
		}
	});
	*/
	getTeacherList(3);
}

function getNewsList(pageNum) {
	var size=13;
	$.ajax({
		url: "/edu/news/getNewsList",
		type: "POST",
		dataType: "json",
		data: {
			rows: size,
			page: pageNum
		},
		async: false,
		success: function(data) {
			if (data.status) {
				$(".newsDiv-body").empty();
				$.each(data.rows, function(i, item) {
					$(".newsDiv-body").append("<a  href='/edu/news/newsInfo.html?news_id=" + item.news_id + "'>" + "<div class='newsDiv-entity'>" + "<div class='newsDiv-entity-title'><span  class='newsDiv-entity-title-span'>" + item.title + "</span>" + "</div>" + "<div class='newsDiv-entity-author'><span class='newsDiv-entity-author-span'>[" + item.author + "]</span>" + "</div>" + "<div class='newsDiv-entity-date'><span class='newsDiv-entity-date-span'>" + item.create_time + "</span>" + "</div>" + "</div>" + "</a>");
				});

				//show page num
				var pageStr = "";
				for (var i = 1; i <= data.max_page; i++) {
					if (i == data.page) {
						pageStr += " <li><a href='javascript:getNewsList(" + i + ")'><span class='page-span-now'>" + i + "</span></a></li> ";
					} else {
						pageStr += " <li><a href='javascript:getNewsList(" + i + ")'><span class='page-span'>" + i + "</span></a></li> ";
					}
				}
				$(".page > ul").empty();
				$(".page > ul").append(pageStr);

			} else {

			}
		}
	});
}

function getLeftNews() {
	$.ajax({
		url: "/edu/news/getNewsList",
		type: "POST",
		dataType: "json",
		data: {
			rows: 10,
			page: 1
		},
		async: false,
		success: function(data) {
			if (data.status) {
				$(".leftNews >.leftBody>ul").empty();
				$.each(data.rows, function(i, item) {
					var newsHtml = "";
					newsHtml += "	<li>";
					newsHtml += "	<a href='/edu/news/newsInfo.html?news_id=" + item.news_id + "'>";
					newsHtml += "	<div class='nTitle'>&nbsp;&nbsp;&bull;" + item.title + "</div>";
					newsHtml += "	</a>";
					newsHtml += "	</li>";
					$(".leftNews > .leftBody>ul").append(newsHtml);
				});
			}
		}
	});
}